home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AEffdCommon.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.4 KB  |  110 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //    Alias|Wavefront Script File
  19. //
  20. //    Creation Date:    June 16, 1997
  21. //    Author:            sw
  22. //
  23. //    Procedure Name:
  24. //    AEffdCommon 
  25. //
  26. //    Description Name;
  27. //    Creates the attribute editor controls for the ffd node
  28. //
  29. //    Input Value:
  30. //    nodeName
  31. //
  32. //    Output Value:
  33. //    None
  34. //
  35.  
  36. global proc checkFfdPartialResolution ( string $nodeName )
  37. {
  38.     string $nodeAttr = $nodeName + ".usePartialResolution";
  39.     int $value = `getAttr $nodeAttr`;
  40.     if ($value == 0) {
  41.         editorTemplate -dimControl $nodeName "partialResolution" true;
  42.     } else {
  43.         editorTemplate -dimControl $nodeName "partialResolution" false;
  44.     }
  45. }
  46.  
  47. global proc checkFfdLocal ( string $nodeName )
  48. {
  49.     string $nodeAttr = $nodeName + ".local";
  50.     int $value = `getAttr $nodeAttr`;
  51.     if ($value == 0) {
  52.         editorTemplate -dimControl $nodeName "localInfluenceS" true;
  53.         editorTemplate -dimControl $nodeName "localInfluenceT" true;
  54.         editorTemplate -dimControl $nodeName "localInfluenceU" true;
  55.     } else {
  56.         editorTemplate -dimControl $nodeName "localInfluenceS" false;
  57.         editorTemplate -dimControl $nodeName "localInfluenceT" false;
  58.         editorTemplate -dimControl $nodeName "localInfluenceU" false;
  59.     }
  60. }
  61.  
  62. global proc AEuseFfdPartialResolutionNew( string $attrName )
  63. {
  64.     setUITemplate -pst attributeEditorTemplate;    
  65.      attrEnumOptionMenuGrp -attribute $attrName -l "Partial Resolution"
  66.         usePartialResolutionEnum;
  67.     setUITemplate -ppt;
  68.  
  69.     AEuseFfdPartialResolutionReplace $attrName;
  70. }
  71.  
  72. global proc AEuseFfdPartialResolutionReplace( string $attrName )
  73. {
  74.     string $tmp[];
  75.     tokenize($attrName, ".", $tmp);
  76.     string $nodeName = $tmp[0];
  77.  
  78.      attrEnumOptionMenuGrp -e -attribute $attrName -l "Partial Resolution"
  79.         usePartialResolutionEnum;
  80.     scriptJob -p usePartialResolutionEnum -rp
  81.         -ac $attrName ("checkFfdPartialResolution " + $nodeName );
  82.  
  83.     // Check the partial resoultion initial state
  84.     //
  85.     evalDeferred ("checkFfdPartialResolution " + $nodeName);
  86. }
  87.  
  88. global proc AEffdCommon ( string $nodeName )
  89. {
  90.     editorTemplate -addControl "local" "checkFfdLocal";
  91.     editorTemplate -addControl "localInfluenceS";
  92.     editorTemplate -addControl "localInfluenceT";
  93.     editorTemplate -addControl "localInfluenceU";
  94.     
  95.     editorTemplate -addSeparator;
  96.     
  97.     editorTemplate -callCustom "AEuseFfdPartialResolutionNew"
  98.         "AEuseFfdPartialResolutionReplace" "usePartialResolution";
  99.     editorTemplate -addControl "partialResolution";
  100.     editorTemplate -addControl "freezeGeometry";
  101.  
  102.     // include/call base class/node attributes
  103.     AEgeometryFilterCommon $nodeName;
  104.     
  105.     // suppressed attributes
  106.     editorTemplate -suppress "caching";
  107.  
  108.     editorTemplate -suppress "usePartialResolution";
  109. }
  110.